package com.lxd.bank.service;

import com.lxd.bank.mapper.BankMapper;
import com.lxd.bank.pojo.BankMqLog;
import com.lxd.bank.pojo.OrderMqLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BankService {
    @Autowired
    private BankMapper bankMapper;

    public List<BankMqLog> selectMqLogByTid(Integer id) {
        if (id==null){
            throw new RuntimeException("user id is null");
        }
        List<BankMqLog>bankMqLogs= bankMapper.selectMqLogByTid(id);
        return bankMqLogs;
    }

    public void updateAccount(OrderMqLog msg) {
        bankMapper.updateAccount(msg);
    }

    public void insertMqLog(OrderMqLog msg) {
        bankMapper.insertMqLog(msg);
    }
}
